<include file="Public/header" />
	<body>
		<div class="mui-content">
		    <header class="mui-bar mui-bar-nav pub_head">
		        <a class="mui-action-back mui-icon mui-pull-left iconfont icon-left" href="javascript:history.go(-1)"></a>
		        <h1 class="mui-title">幼儿园列表</h1>
		        <a class="mui-icon mui-pull-right iconfont icon-house1" style="font-size:26px;padding-top:0.5rem;" href='/'></a>
		    </header>
                   <if condition=" !empty($member) ">
		    <ul class="mui-table-view noti-cont mTop kind_cont" id="list">
		        <foreach name="member" item="vo">
                            <li class="mui-table-view-cell mui-media kind_img">
                                <a href="{:U('Index/index_education',array('uid'=>$vo['uid']))}">
                                    <img class="mui-media-object mui-pull-left" src="{$vo.head}">
                                    <div class="mui-media-body noti-title">
                                            <p class="kind_list_tit">{$vo.name}</p>
                                        <p class="mui-ellipsis">{$vo.address}</p>
                                    </div>
                                </a>
                            </li>
                        </foreach>
		    </ul>
                       <div id="jiazai" style="display: none;text-align: center;"><img width="20px" height="20px;" src="__PUBLIC__/kinderGarent/src/images/time.gif"></div>
                       <else/>
                                    <div class="no-message">
                                        <i class="iconfont icon-zanwuxiaoxitixing"></i>
                                        <p>暂无消息</p>
                                    </div>
                                </if>
		</div>
	</body>
     <script>
        var p=2;
        var d = document.getElementById("list").offsetHeight;
        window.addEventListener("scroll", function(event) {
            var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;  
            if(document.documentElement.scrollHeight == document.documentElement.clientHeight + scrollTop ) {
              getData();
            }        
        });
        function getData(){
            $('#jiazai').show();
            $.ajax({
                url:"{:U('getData')}",
                type:"get",
                data:{p:p},
                success:function(e){
                    if(e==1){
                        setTimeout(function(){
                            $('#jiazai').html('<font style="font-size:8px;color:#c1c1c1;">没有更多数据</font>');
                         },2000);
                        
                    }else{
                         p++;
                         setTimeout(function(){
                            $('#list').append(e);
                            $('#jiazai').hide();
                         },2000);
                        
                    }
                   
                }
            })
        }
    </script>
</html>